package com.longer.demo.biz.repository;

import com.longer.demo.biz.domain.ItemStockDO;
import org.apache.ibatis.annotations.Param;

public interface ItemStockDOMapper {
	int deleteByPrimaryKey(Integer id);

	int insert(ItemStockDO record);

	int insertSelective(ItemStockDO record);

	ItemStockDO selectByItemId(Integer itemId);

	ItemStockDO selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(ItemStockDO record);

	int updateByPrimaryKey(ItemStockDO record);

	/**
	 * 减少库存
	 * @param account
	 * @return
	 */
	int minusStock(@Param("account") Integer account, @Param("itemId") Integer itemId);

}